﻿namespace IdentityServer.Dtos
{
    public class ReturnResult<T>
    {
        public int Code { get; set; }
        public string Msg { get; set; }
        public T Data { get; set; }

        public static ReturnResult<T> Success(T data)
        {
            return new ReturnResult<T>
            {
                Data = data,
                Code = 200
            };
        }
        public static ReturnResult<T> Failed(string msg)
        {
            return new ReturnResult<T>
            {
                Msg = msg,
                Code = 500
            };
        }
    }
}
